<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/gui/text/qtextlayout.cpp -->
<head>
  <title>Qt 4.3: QTextLayout Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QTextLayout Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1>
<p>The QTextLayout class is used to lay out and paint a single paragraph of text. <a href="#details">More...</a></p>
<pre> #include &lt;QTextLayout&gt;</pre><ul>
<li><a href="qtextlayout-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h3>Public Types</h3>
<ul>
<li><div class="fn"/>class <b><a href="qtextlayout-formatrange.html">FormatRange</a></b></li>
<li><div class="fn"/>enum <b><a href="qtextlayout.html#CursorMode-enum">CursorMode</a></b> { SkipCharacters, SkipWords }</li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qtextlayout.html#QTextLayout">QTextLayout</a></b> ()</li>
<li><div class="fn"/><b><a href="qtextlayout.html#QTextLayout-2">QTextLayout</a></b> ( const QString &amp; <i>text</i> )</li>
<li><div class="fn"/><b><a href="qtextlayout.html#QTextLayout-3">QTextLayout</a></b> ( const QString &amp; <i>text</i>, const QFont &amp; <i>font</i>, QPaintDevice * <i>paintdevice</i> = 0 )</li>
<li><div class="fn"/><b><a href="qtextlayout.html#dtor.QTextLayout">~QTextLayout</a></b> ()</li>
<li><div class="fn"/>QList&lt;FormatRange&gt; <b><a href="qtextlayout.html#additionalFormats">additionalFormats</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qtextlayout.html#beginLayout">beginLayout</a></b> ()</li>
<li><div class="fn"/>QRectF <b><a href="qtextlayout.html#boundingRect">boundingRect</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qtextlayout.html#cacheEnabled">cacheEnabled</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qtextlayout.html#clearAdditionalFormats">clearAdditionalFormats</a></b> ()</li>
<li><div class="fn"/>QTextLine <b><a href="qtextlayout.html#createLine">createLine</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qtextlayout.html#draw">draw</a></b> ( QPainter * <i>p</i>, const QPointF &amp; <i>pos</i>, const QVector&lt;FormatRange&gt; &amp; <i>selections</i> = QVector&lt;FormatRange&gt; (), const QRectF &amp; <i>clip</i> = QRectF() ) const</li>
<li><div class="fn"/>void <b><a href="qtextlayout.html#drawCursor">drawCursor</a></b> ( QPainter * <i>painter</i>, const QPointF &amp; <i>position</i>, int <i>cursorPosition</i>, int <i>width</i> ) const</li>
<li><div class="fn"/>void <b><a href="qtextlayout.html#drawCursor-2">drawCursor</a></b> ( QPainter * <i>painter</i>, const QPointF &amp; <i>position</i>, int <i>cursorPosition</i> ) const</li>
<li><div class="fn"/>void <b><a href="qtextlayout.html#endLayout">endLayout</a></b> ()</li>
<li><div class="fn"/>QFont <b><a href="qtextlayout.html#font">font</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qtextlayout.html#isValidCursorPosition">isValidCursorPosition</a></b> ( int <i>pos</i> ) const</li>
<li><div class="fn"/>QTextLine <b><a href="qtextlayout.html#lineAt">lineAt</a></b> ( int <i>i</i> ) const</li>
<li><div class="fn"/>int <b><a href="qtextlayout.html#lineCount">lineCount</a></b> () const</li>
<li><div class="fn"/>QTextLine <b><a href="qtextlayout.html#lineForTextPosition">lineForTextPosition</a></b> ( int <i>pos</i> ) const</li>
<li><div class="fn"/>qreal <b><a href="qtextlayout.html#maximumWidth">maximumWidth</a></b> () const</li>
<li><div class="fn"/>qreal <b><a href="qtextlayout.html#minimumWidth">minimumWidth</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qtextlayout.html#nextCursorPosition">nextCursorPosition</a></b> ( int <i>oldPos</i>, CursorMode <i>mode</i> = SkipCharacters ) const</li>
<li><div class="fn"/>QPointF <b><a href="qtextlayout.html#position">position</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qtextlayout.html#preeditAreaPosition">preeditAreaPosition</a></b> () const</li>
<li><div class="fn"/>QString <b><a href="qtextlayout.html#preeditAreaText">preeditAreaText</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qtextlayout.html#previousCursorPosition">previousCursorPosition</a></b> ( int <i>oldPos</i>, CursorMode <i>mode</i> = SkipCharacters ) const</li>
<li><div class="fn"/>void <b><a href="qtextlayout.html#setAdditionalFormats">setAdditionalFormats</a></b> ( const QList&lt;FormatRange&gt; &amp; <i>formatList</i> )</li>
<li><div class="fn"/>void <b><a href="qtextlayout.html#setCacheEnabled">setCacheEnabled</a></b> ( bool <i>enable</i> )</li>
<li><div class="fn"/>void <b><a href="qtextlayout.html#setFont">setFont</a></b> ( const QFont &amp; <i>font</i> )</li>
<li><div class="fn"/>void <b><a href="qtextlayout.html#setPosition">setPosition</a></b> ( const QPointF &amp; <i>p</i> )</li>
<li><div class="fn"/>void <b><a href="qtextlayout.html#setPreeditArea">setPreeditArea</a></b> ( int <i>position</i>, const QString &amp; <i>text</i> )</li>
<li><div class="fn"/>void <b><a href="qtextlayout.html#setText">setText</a></b> ( const QString &amp; <i>string</i> )</li>
<li><div class="fn"/>void <b><a href="qtextlayout.html#setTextOption">setTextOption</a></b> ( const QTextOption &amp; <i>option</i> )</li>
<li><div class="fn"/>QString <b><a href="qtextlayout.html#text">text</a></b> () const</li>
<li><div class="fn"/>QTextOption <b><a href="qtextlayout.html#textOption">textOption</a></b> () const</li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QTextLayout class is used to lay out and paint a single paragraph of text.</p>
<p>It offers most features expected from a modern text layout engine, including Unicode compliant rendering, line breaking and handling of cursor positioning. It can also produce and render device independent layout, something that is important for WYSIWYG applications.</p>
<p>The class has a rather low level API and unless you intend to implement your own text rendering for some specialized widget, you probably won't need to use it directly.</p>
<p>QTextLayout can currently deal with plain text and rich text paragraphs that are part of a <a href="qtextdocument.html">QTextDocument</a>.</p>
<p>QTextLayout can be used to create a sequence of <a href="qtextline.html">QTextLine</a>'s with given widths and can position them independently on the screen. Once the layout is done, these lines can be drawn on a paint device.</p>
<p>Here's some pseudo code that presents the layout phase:</p>
<pre> int leading = fontMetrics.leading();
 int height = 0;
 qreal widthUsed = 0;
 textLayout.beginLayout();
 while (1) {
     QTextLine line = textLayout.createLine();
     if (!line.isValid())
         break;

     line.setLineWidth(lineWidth);
     height += leading;
     line.setPosition(QPoint(0, height));
     height += line.height();
     widthUsed = qMax(widthUsed, line.naturalTextWidth());
 }
 textLayout.endLayout();</pre>
<p>The text can be drawn by calling the layout's <a href="qtextlayout.html#draw">draw</a>() function:</p>
<pre> QPainter painter(this);
 textLayout.draw(&amp;painter, QPoint(0, 0));</pre>
<p>The text layout's text is set in the constructor or with <a href="qtextlayout.html#setText">setText</a>(). The layout can be seen as a sequence of <a href="qtextline.html">QTextLine</a> objects; use <a href="qtextlayout.html#lineAt">lineAt</a>() or <a href="qtextlayout.html#lineForTextPosition">lineForTextPosition</a>() to get a <a href="qtextline.html">QTextLine</a>, <a href="qtextlayout.html#createLine">createLine</a>() to create one. For a given position in the text you can find a valid cursor position with <a href="qtextlayout.html#isValidCursorPosition">isValidCursorPosition</a>(), <a href="qtextlayout.html#nextCursorPosition">nextCursorPosition</a>(), and <a href="qtextlayout.html#previousCursorPosition">previousCursorPosition</a>(). The layout itself can be positioned with <a href="qtextlayout.html#setPosition">setPosition</a>(); it has a <a href="qtextlayout.html#boundingRect">boundingRect</a>(), and a <a href="qtextlayout.html#minimumWidth">minimumWidth</a>() and a <a href="qtextlayout.html#maximumWidth">maximumWidth</a>(). A text layout can be drawn on a painter device using <a href="qtextlayout.html#draw">draw</a>().</p>
<hr />
<h2>Member Type Documentation</h2>
<h3 class="fn"><a name="CursorMode-enum"></a>enum QTextLayout::CursorMode</h3>
<p><table border="1" cellpadding="2" cellspacing="1" width="40%">
<tr><th width="60%">Constant</th><th width="40%">Value</th></tr>
<tr><td valign="top"><tt>QTextLayout::SkipCharacters</tt></td><td align="center" valign="top"><tt>0</tt></td></tr>
<tr><td valign="top"><tt>QTextLayout::SkipWords</tt></td><td align="center" valign="top"><tt>1</tt></td></tr>
</table></p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QTextLayout"></a>QTextLayout::QTextLayout ()</h3>
<p>Constructs an empty text layout.</p>
<p>See also <a href="qtextlayout.html#setText">setText</a>().</p>
<h3 class="fn"><a name="QTextLayout-2"></a>QTextLayout::QTextLayout ( const <a href="qstring.html">QString</a> &amp; <i>text</i> )</h3>
<p>Constructs a text layout to lay out the given <i>text</i>.</p>
<h3 class="fn"><a name="QTextLayout-3"></a>QTextLayout::QTextLayout ( const <a href="qstring.html">QString</a> &amp; <i>text</i>, const <a href="qfont.html">QFont</a> &amp; <i>font</i>, <a href="qpaintdevice.html">QPaintDevice</a> * <i>paintdevice</i> = 0 )</h3>
<p>Constructs a text layout to lay out the given <i>text</i> with the specified <i>font</i>.</p>
<p>All the metric and layout calculations will be done in terms of the paint device, <i>paintdevice</i>. If <i>paintdevice</i> is 0 the calculations will be done in screen metrics.</p>
<h3 class="fn"><a name="dtor.QTextLayout"></a>QTextLayout::~QTextLayout ()</h3>
<p>Destructs the layout.</p>
<h3 class="fn"><a name="additionalFormats"></a><a href="qlist.html">QList</a>&lt;<a href="qtextlayout-formatrange.html">FormatRange</a>&gt; QTextLayout::additionalFormats () const</h3>
<p>Returns the list of additional formats supported by the text layout.</p>
<p>See also <a href="qtextlayout.html#setAdditionalFormats">setAdditionalFormats</a>() and <a href="qtextlayout.html#clearAdditionalFormats">clearAdditionalFormats</a>().</p>
<h3 class="fn"><a name="beginLayout"></a>void QTextLayout::beginLayout ()</h3>
<p>Begins the layout process.</p>
<h3 class="fn"><a name="boundingRect"></a><a href="qrectf.html">QRectF</a> QTextLayout::boundingRect () const</h3>
<p>The smallest rectangle that contains all the lines in the layout.</p>
<h3 class="fn"><a name="cacheEnabled"></a>bool QTextLayout::cacheEnabled () const</h3>
<p>Returns true if the complete layout information is cached; otherwise returns false.</p>
<p>See also <a href="qtextlayout.html#setCacheEnabled">setCacheEnabled</a>().</p>
<h3 class="fn"><a name="clearAdditionalFormats"></a>void QTextLayout::clearAdditionalFormats ()</h3>
<p>Clears the list of additional formats supported by the text layout.</p>
<p>See also <a href="qtextlayout.html#additionalFormats">additionalFormats</a>() and <a href="qtextlayout.html#setAdditionalFormats">setAdditionalFormats</a>().</p>
<h3 class="fn"><a name="createLine"></a><a href="qtextline.html">QTextLine</a> QTextLayout::createLine ()</h3>
<p>Returns a new text line to be laid out if there is text to be inserted into the layout; otherwise returns an invalid text line.</p>
<p>The text layout creates a new line object that starts after the last line in the layout, or at the beginning if the layout is empty. The layout maintains an internal cursor, and each line is filled with text from the cursor position onwards when the <a href="qtextline.html#setLineWidth">QTextLine::setLineWidth</a>() function is called.</p>
<p>Once <a href="qtextline.html#setLineWidth">QTextLine::setLineWidth</a>() is called, a new line can be created and filled with text. Repeating this process will lay out the whole block of text contained in the <a href="qtextlayout.html">QTextLayout</a>. If there is no text left to be inserted into the layout, the <a href="qtextline.html">QTextLine</a> returned will not be valid (isValid() will return false).</p>
<h3 class="fn"><a name="draw"></a>void QTextLayout::draw ( <a href="qpainter.html">QPainter</a> * <i>p</i>, const <a href="qpointf.html">QPointF</a> &amp; <i>pos</i>, const <a href="qvector.html">QVector</a>&lt;<a href="qtextlayout-formatrange.html">FormatRange</a>&gt; &amp; <i>selections</i> = QVector&lt;FormatRange&gt; (), const <a href="qrectf.html">QRectF</a> &amp; <i>clip</i> = QRectF() ) const</h3>
<p>Draws the whole layout on the painter <i>p</i> at the position specified by <i>pos</i>. The rendered layout includes the given <i>selections</i> and is clipped within the rectangle specified by <i>clip</i>.</p>
<h3 class="fn"><a name="drawCursor"></a>void QTextLayout::drawCursor ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, const <a href="qpointf.html">QPointF</a> &amp; <i>position</i>, int <i>cursorPosition</i>, int <i>width</i> ) const</h3>
<p>Draws a text cursor with the current pen and the specified <i>width</i> at the given <i>position</i> using the <i>painter</i> specified. The corresponding position within the text is specified by <i>cursorPosition</i>.</p>
<h3 class="fn"><a name="drawCursor-2"></a>void QTextLayout::drawCursor ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, const <a href="qpointf.html">QPointF</a> &amp; <i>position</i>, int <i>cursorPosition</i> ) const</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Draws a text cursor with the current pen at the given <i>position</i> using the <i>painter</i> specified. The corresponding position within the text is specified by <i>cursorPosition</i>.</p>
<h3 class="fn"><a name="endLayout"></a>void QTextLayout::endLayout ()</h3>
<p>Ends the layout process.</p>
<h3 class="fn"><a name="font"></a><a href="qfont.html">QFont</a> QTextLayout::font () const</h3>
<p>Returns the current font that is used for the layout, or a default font if none is set.</p>
<p>See also <a href="qtextlayout.html#setFont">setFont</a>().</p>
<h3 class="fn"><a name="isValidCursorPosition"></a>bool QTextLayout::isValidCursorPosition ( int <i>pos</i> ) const</h3>
<p>Returns true if position <i>pos</i> is a valid cursor position.</p>
<p>In a Unicode context some positions in the text are not valid cursor positions, because the position is inside a Unicode surrogate or a grapheme cluster.</p>
<p>A grapheme cluster is a sequence of two or more Unicode characters that form one indivisible entity on the screen. For example the latin character `&Auml;' can be represented in Unicode by two characters, `A' (0x41), and the combining diaresis (0x308). A text cursor can only validly be positioned before or after these two characters, never between them since that wouldn't make sense. In indic languages every syllable forms a grapheme cluster.</p>
<h3 class="fn"><a name="lineAt"></a><a href="qtextline.html">QTextLine</a> QTextLayout::lineAt ( int <i>i</i> ) const</h3>
<p>Returns the <i>i</i>-th line of text in this text layout.</p>
<p>See also <a href="qtextlayout.html#lineCount">lineCount</a>() and <a href="qtextlayout.html#lineForTextPosition">lineForTextPosition</a>().</p>
<h3 class="fn"><a name="lineCount"></a>int QTextLayout::lineCount () const</h3>
<p>Returns the number of lines in this text layout.</p>
<p>See also <a href="qtextlayout.html#lineAt">lineAt</a>().</p>
<h3 class="fn"><a name="lineForTextPosition"></a><a href="qtextline.html">QTextLine</a> QTextLayout::lineForTextPosition ( int <i>pos</i> ) const</h3>
<p>Returns the line that contains the cursor position specified by <i>pos</i>.</p>
<p>See also <a href="qtextlayout.html#isValidCursorPosition">isValidCursorPosition</a>() and <a href="qtextlayout.html#lineAt">lineAt</a>().</p>
<h3 class="fn"><a name="maximumWidth"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QTextLayout::maximumWidth () const</h3>
<p>The maximum width the layout could expand to; this is essentially the width of the entire text.</p>
<p><b>Warning:</b> This function only returns a valid value after the layout has been done.</p>
<p>See also <a href="qtextlayout.html#minimumWidth">minimumWidth</a>().</p>
<h3 class="fn"><a name="minimumWidth"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QTextLayout::minimumWidth () const</h3>
<p>The minimum width the layout needs. This is the width of the layout's smallest non-breakable substring.</p>
<p><b>Warning:</b> This function only returns a valid value after the layout has been done.</p>
<p>See also <a href="qtextlayout.html#maximumWidth">maximumWidth</a>().</p>
<h3 class="fn"><a name="nextCursorPosition"></a>int QTextLayout::nextCursorPosition ( int <i>oldPos</i>, <a href="qtextlayout.html#CursorMode-enum">CursorMode</a> <i>mode</i> = SkipCharacters ) const</h3>
<p>Returns the next valid cursor position after <i>oldPos</i> that respects the given cursor <i>mode</i>.</p>
<p>See also <a href="qtextlayout.html#isValidCursorPosition">isValidCursorPosition</a>() and <a href="qtextlayout.html#previousCursorPosition">previousCursorPosition</a>().</p>
<h3 class="fn"><a name="position"></a><a href="qpointf.html">QPointF</a> QTextLayout::position () const</h3>
<p>The global position of the layout. This is independent of the bounding rectangle and of the layout process.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qtextlayout.html#setPosition">setPosition</a>().</p>
<h3 class="fn"><a name="preeditAreaPosition"></a>int QTextLayout::preeditAreaPosition () const</h3>
<p>Returns the position of the area in the text layout that will be processed before editing occurs.</p>
<h3 class="fn"><a name="preeditAreaText"></a><a href="qstring.html">QString</a> QTextLayout::preeditAreaText () const</h3>
<p>Returns the text that is inserted in the layout before editing occurs.</p>
<h3 class="fn"><a name="previousCursorPosition"></a>int QTextLayout::previousCursorPosition ( int <i>oldPos</i>, <a href="qtextlayout.html#CursorMode-enum">CursorMode</a> <i>mode</i> = SkipCharacters ) const</h3>
<p>Returns the first valid cursor position before <i>oldPos</i> that respects the given cursor <i>mode</i>.</p>
<p>See also <a href="qtextlayout.html#isValidCursorPosition">isValidCursorPosition</a>() and <a href="qtextlayout.html#nextCursorPosition">nextCursorPosition</a>().</p>
<h3 class="fn"><a name="setAdditionalFormats"></a>void QTextLayout::setAdditionalFormats ( const <a href="qlist.html">QList</a>&lt;<a href="qtextlayout-formatrange.html">FormatRange</a>&gt; &amp; <i>formatList</i> )</h3>
<p>Sets the additional formats supported by the text layout to <i>formatList</i>.</p>
<p>See also <a href="qtextlayout.html#additionalFormats">additionalFormats</a>() and <a href="qtextlayout.html#clearAdditionalFormats">clearAdditionalFormats</a>().</p>
<h3 class="fn"><a name="setCacheEnabled"></a>void QTextLayout::setCacheEnabled ( bool <i>enable</i> )</h3>
<p>Enables caching of the complete layout information if <i>enable</i> is true; otherwise disables layout caching. Usually <a href="qtextlayout.html">QTextLayout</a> throws most of the layouting information away after a call to <a href="qtextlayout.html#endLayout">endLayout</a>() to reduce memory consumption. If you however want to draw the laid out text directly afterwards enabling caching might speed up drawing significantly.</p>
<p>See also <a href="qtextlayout.html#cacheEnabled">cacheEnabled</a>().</p>
<h3 class="fn"><a name="setFont"></a>void QTextLayout::setFont ( const <a href="qfont.html">QFont</a> &amp; <i>font</i> )</h3>
<p>Sets the layout's font to the given <i>font</i>. The layout is invalidated and must be laid out again.</p>
<p>See also <a href="qtextlayout.html#font">font</a>() and <a href="qtextlayout.html#text">text</a>().</p>
<h3 class="fn"><a name="setPosition"></a>void QTextLayout::setPosition ( const <a href="qpointf.html">QPointF</a> &amp; <i>p</i> )</h3>
<p>Moves the text layout to point <i>p</i>.</p>
<p>See also <a href="qtextlayout.html#position">position</a>().</p>
<h3 class="fn"><a name="setPreeditArea"></a>void QTextLayout::setPreeditArea ( int <i>position</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i> )</h3>
<p>Sets the <i>position</i> and <i>text</i> of the area in the layout that is processed before editing occurs.</p>
<h3 class="fn"><a name="setText"></a>void QTextLayout::setText ( const <a href="qstring.html">QString</a> &amp; <i>string</i> )</h3>
<p>Sets the layout's text to the given <i>string</i>. The layout is invalidated and must be laid out again.</p>
<p>See also <a href="qtextlayout.html#text">text</a>().</p>
<h3 class="fn"><a name="setTextOption"></a>void QTextLayout::setTextOption ( const <a href="qtextoption.html">QTextOption</a> &amp; <i>option</i> )</h3>
<p>Sets the text option structure that controls the layout process to the given <i>option</i>.</p>
<p>See also <a href="qtextlayout.html#textOption">textOption</a>() and <a href="qtextoption.html">QTextOption</a>.</p>
<h3 class="fn"><a name="text"></a><a href="qstring.html">QString</a> QTextLayout::text () const</h3>
<p>Returns the layout's text.</p>
<p>See also <a href="qtextlayout.html#setText">setText</a>().</p>
<h3 class="fn"><a name="textOption"></a><a href="qtextoption.html">QTextOption</a> QTextLayout::textOption () const</h3>
<p>Returns the current text option used to control the layout process.</p>
<p>See also <a href="qtextlayout.html#setTextOption">setTextOption</a>() and <a href="qtextoption.html">QTextOption</a>.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
